package com.splant.android.smart.SystemDefinedLevel.PowerManager;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;


/**
 * Created by Administrator on 2015/9/28.
 */
public class PowerConnectionReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent)
    {

         // Toast.makeText(context,"01",Toast.LENGTH_LONG).show();
          try
          {
              Process proc =Runtime.getRuntime().exec(new String[]{"su","-c","reboot -p"});  //关机
              proc.waitFor();
          }
          catch (Exception e)
          {
          }

    }
}